home *** CD-ROM | disk | FTP | other *** search
/ Aminet 21 / Aminet 21 (1997)(GTI - Schatztruhe)[!][Oct 1997].iso / Aminet / dev / misc / RenderLib.lha / RenderLib / include / render / render.i < prev    next >
Encoding:
Text File  |  1997-06-26  |  8.9 KB  |  303 lines

  1.     IFND RENDER_I
  2. RENDER_I    SET    1
  3. **
  4. **    $VER: render.i 22.0 (26.6.97)
  5. **
  6. **    render.library definitions
  7. **
  8. **    © 1996 TEK neoscientists
  9. **
  10.  
  11. ;------------------------------------------------------------------------
  12.  
  13.     IFND UTILITY_TAGITEM_I
  14.     include "utility/tagitem.i"
  15.     ENDC
  16.  
  17. ;------------------------------------------------------------------------
  18.  
  19. RND_TAGBASE        EQU    TAG_USER+$1000
  20.  
  21.  
  22. ;------------------------------------------------------------------------
  23. ;
  24. ;    memhandler
  25. ;
  26. ;------------------------------------------------------------------------
  27.  
  28. RND_MemType        EQU    RND_TAGBASE+1    ; type of memhandler, see below
  29. RND_MemBlock        EQU    RND_TAGBASE+2    ; ptr to block of memory
  30. RND_MemSize        EQU    RND_TAGBASE+3    ; size of memblock [bytes]
  31. RND_MemFlags        EQU    RND_TAGBASE+18    ; memflags (exec/memory.h)
  32. RND_RMHandler        EQU    RND_TAGBASE+12    ; to pass a memhandler as an argument
  33.  
  34. *
  35. *    memhandler types
  36. *
  37.  
  38. RMHTYPE_POOL        EQU    1        ; v39 exec dynamic pool
  39. RMHTYPE_PRIVATE        EQU    2        ; private memory pool
  40. RMHTYPE_PUBLIC        EQU    3        ; common public memory
  41.  
  42.  
  43. ;------------------------------------------------------------------------
  44. ;
  45. ;    palette
  46. ;
  47. ;------------------------------------------------------------------------
  48.  
  49. RND_PaletteFormat    EQU    RND_TAGBASE+19    ; palette import/export format
  50. RND_EHBPalette        EQU    RND_TAGBASE+22    ; indicate a palette is EHB
  51. RND_FirstColor        EQU    RND_TAGBASE+23    ; first color entry
  52. RND_NewPalette        EQU    RND_TAGBASE+24    ; dispose the old palette and load a new one
  53. RND_RGBWeight        EQU    RND_TAGBASE+11    ; quantization factors for ExtractPalette()
  54.  
  55. *
  56. *    palette format types
  57. *
  58.  
  59. PALFMT_RGB32        EQU    1        ; ULONG red,green,blue
  60. PALFMT_RGB8        EQU    2        ; ULONG $00rrggbb
  61. PALFMT_RGB4        EQU    3        ; UWORD    $0rgb
  62. PALFMT_PALETTE        EQU    4        ; render.library palette
  63.  
  64. *
  65. *    palette sort mode types
  66. *    for the use with SortPalette()
  67. *
  68.  
  69.     ; no particular order
  70. PALMODE_NONE        EQU    $0000
  71.  
  72.     ; sort palette entries by brightness
  73. PALMODE_BRIGHTNESS    EQU    $0001        
  74.  
  75.     ; sort palette entries by the number of pixels that they represent.
  76.     ; You must supply the RND_Histogram taglist argument.
  77. PALMODE_POPULARITY    EQU    $0002
  78.  
  79.     ; sort palette entries by the number of histogram entries that they
  80.     ; represent. You must supply the RND_Histogram taglist argument.
  81. PALMODE_REPRESENTATION    EQU    $0003
  82.  
  83.     ; sort palette entries by their optical significance for the human
  84.     ; eye. Implementation is unknown to you and may change.
  85.     ; You must supply the RND_Histogram taglist argument.
  86. PALMODE_SIGNIFICANCE    EQU    $0004
  87.  
  88.     ; sort palette entries by color intensity
  89. PALMODE_SATURATION    EQU    $0005
  90.  
  91.     ; By default, sort direction is descending, i.e. the precedence is
  92.     ; more-to-less. Combine with this flag to invert the sort direction.
  93. PALMODE_ASCENDING    EQU    $0008
  94.  
  95.  
  96. ;------------------------------------------------------------------------
  97. ;
  98. ;    histogram related
  99. ;
  100. ;------------------------------------------------------------------------
  101.  
  102. RND_HSType        EQU    RND_TAGBASE+4    ; histogram type, see below
  103. RND_Histogram        EQU    RND_TAGBASE+9    ; a histogram as an argument
  104.  
  105. *
  106. *    Histogram / Palette types
  107. *    to be specified with RND_HSType
  108. *
  109.  
  110. HSTYPE_12BIT        EQU    4        ; 12bit dynamic histogram
  111. HSTYPE_15BIT        EQU    5        ; 15bit dynamic histogram
  112. HSTYPE_18BIT        EQU    6        ; 18bit dynamic histogram
  113. HSTYPE_21BIT        EQU    7        ; 21bit dynamic histogram
  114. HSTYPE_24BIT        EQU    8        ; 24bit dynamic histogram
  115. HSTYPE_12BIT_TURBO    EQU    20        ; 12bit tabular histogram
  116. HSTYPE_15BIT_TURBO    EQU    21        ; 15bit tabular histogram
  117. HSTYPE_18BIT_TURBO    EQU    22        ; 18bit tabular histogram
  118.  
  119. *
  120. *    tags that can be queried via QueryHistogram()
  121. *
  122.  
  123. RND_NumPixels        EQU    RND_TAGBASE+5    ; # pixels in a histogram
  124. RND_NumColors        EQU    RND_TAGBASE+6    ; # colors in a histogram
  125.  
  126.  
  127. ;------------------------------------------------------------------------
  128. ;
  129. ;    rendering and conversions
  130. ;
  131. ;------------------------------------------------------------------------
  132.  
  133. RND_ColorMode        EQU    RND_TAGBASE+7    ; color mode, see below
  134. RND_DitherMode        EQU    RND_TAGBASE+8    ; dither mode, see below
  135. RND_DitherAmount    EQU    RND_TAGBASE+26    ; dither amount
  136. RND_OffsetColorZero    EQU    RND_TAGBASE+10    ; first color index to be output
  137.  
  138. *
  139. *    color mode types
  140. *    to be specified with RND_ColorMode
  141. *
  142.  
  143. COLORMODE_CLUT        EQU    $0000        ; normal palette lookup
  144. COLORMODE_HAM8        EQU    $0001        ; HAM8 mode
  145. COLORMODE_HAM6        EQU    $0002        ; HAM6 mode
  146. COLORMODE_MASK        EQU    $0003        ; mask to determine COLORMODE
  147.  
  148. *
  149. *    dither mode types
  150. *    to be specified with RND_DitherMode
  151. *
  152.  
  153. DITHERMODE_NONE        EQU    $0000        ; no dither
  154. DITHERMODE_FS        EQU    $0001        ; Floyd-Steinberg dither
  155. DITHERMODE_RANDOM    EQU    $0002        ; random dither
  156.  
  157.  
  158. ;------------------------------------------------------------------------
  159. ;
  160. ;    miscellaneous
  161. ;
  162. ;------------------------------------------------------------------------
  163.  
  164. RND_ProgressHook    EQU    RND_TAGBASE+13    ; progress callback hook
  165. RND_SourceWidth        EQU    RND_TAGBASE+14    ; total input width [pixels]
  166. RND_DestWidth        EQU    RND_TAGBASE+15    ; total output width [pixels]
  167. RND_PenTable        EQU    RND_TAGBASE+16    ; ptr to a chunky conversion table
  168. RND_LeftEdge        EQU    RND_TAGBASE+17    ; chunky data left edge [pixels]
  169. RND_LineHook        EQU     RND_TAGBASE+20    ; line callback hook
  170. RND_MapEngine        EQU    RND_TAGBASE+27    ; Mapping-Engine
  171. RND_Interleave        EQU    RND_TAGBASE+28    ; Interleave
  172. RND_Palette        EQU    RND_TAGBASE+29    ; Palette
  173. RND_Weight        EQU    RND_TAGBASE+30    ; Weight factor
  174. RND_ScaleEngine        EQU    RND_TAGBASE+31    ; ScaleEngine
  175.  
  176.  
  177. ;------------------------------------------------------------------------
  178. ;
  179. ;    alpha-channel
  180. ;
  181. ;------------------------------------------------------------------------
  182.  
  183. RND_AlphaChannel    EQU    RND_TAGBASE+32    ; custom alpha-channel
  184. RND_AlphaModulo        EQU    RND_TAGBASE+33    ; bytes between alpha-channel pixels
  185. RND_AlphaWidth        EQU    RND_TAGBASE+34    ; width of alpha-channel array
  186. RND_MaskRGB        EQU    RND_TAGBASE+35    ; masking RGB for CreateAlphaArray
  187. RND_MaskFalse        EQU    RND_TAGBASE+36    ; mask value for outside color range
  188. RND_MaskTrue        EQU    RND_TAGBASE+37    ; mask value for inside color range
  189.  
  190. RND_SourceWidth2    EQU    RND_TAGBASE+38    ; total source width for 3channel operations
  191. RND_AlphaChannel2    EQU    RND_TAGBASE+39    ; second custom alpha-channel
  192. RND_AlphaModulo2    EQU    RND_TAGBASE+40    ; pixel modulo for a second alpha-channel
  193. RND_AlphaWidth2        EQU    RND_TAGBASE+41    ; width of a second alpha-channel array
  194.  
  195. ;------------------------------------------------------------------------
  196. ;
  197. ;    PixelFormat
  198. ;
  199. ;------------------------------------------------------------------------
  200.  
  201. RND_PixelFormat        EQU    RND_TAGBASE+25    ; pixel format, see below
  202.  
  203. PIXFMTB_CHUNKY        EQU    3
  204. PIXFMTB_BITMAP        EQU    4
  205. PIXFMTB_RGB        EQU    5
  206.  
  207. PIXFMT_CHUNKY_CLUT    EQU    1<<PIXFMTB_CHUNKY+COLORMODE_CLUT
  208. PIXFMT_0RGB_32        EQU    1<<PIXFMTB_RGB+0
  209.  
  210. *
  211. *    these types are currently not used by render.library, but
  212. *    some of them are applicable for guigfx.library functions:
  213. *
  214.  
  215. PIXFMT_CHUNKY_HAM8    EQU    1<<PIXFMTB_CHUNKY+COLORMODE_HAM8
  216. PIXFMT_CHUNKY_HAM6    EQU    1<<PIXFMTB_CHUNKY+COLORMODE_HAM6
  217. PIXFMT_BITMAP_CLUT    EQU    1<<PIXFMTB_BITMAP+COLORMODE_CLUT
  218. PIXFMT_BITMAP_HAM8    EQU    1<<PIXFMTB_BITMAP+COLORMODE_HAM8
  219. PIXFMT_BITMAP_HAM6    EQU    1<<PIXFMTB_BITMAP+COLORMODE_HAM6
  220.  
  221. PIXFMT_RGB_24        EQU    1<<PIXFMTB_RGB+1
  222.  
  223. ;------------------------------------------------------------------------
  224. ;
  225. ;    ExtractPalette return codes
  226. ;
  227. ;    You must at least check for EXTP_SUCCESS.
  228. ;    EXTP_NO_DATA indicates that there were no colors
  229. ;    in the histogram.
  230. ;
  231. ;------------------------------------------------------------------------
  232.  
  233. EXTP_SUCCESS            EQU    0
  234. EXTP_NOT_ENOUGH_MEMORY        EQU    1
  235. EXTP_CALLBACK_ABORTED        EQU    2
  236. EXTP_NO_DATA            EQU    3
  237.  
  238.  
  239. ;------------------------------------------------------------------------
  240. ;
  241. ;    AddRGB, AddRGBImage, AddChunkyImage return codes
  242. ;
  243. ;    You must at least check for ADDH_SUCCESS.
  244. ;    If not returned, the histogram is no longer
  245. ;    guaranteed to be accurate.
  246. ;
  247. ;------------------------------------------------------------------------
  248.  
  249. ADDH_SUCCESS            EQU    0
  250. ADDH_NOT_ENOUGH_MEMORY        EQU    1
  251. ADDH_CALLBACK_ABORTED        EQU    2
  252. ADDH_NO_DATA            EQU    3
  253.  
  254.  
  255. ;------------------------------------------------------------------------
  256. ;
  257. ;    Render return codes
  258. ;
  259. ;    You must at least check for REND_SUCCESS.
  260. ;    If not delivered, the image has not been
  261. ;    rendered completely.
  262. ;
  263. ;------------------------------------------------------------------------
  264.  
  265. REND_SUCCESS            EQU    0
  266. REND_NOT_ENOUGH_MEMORY        EQU    1
  267. REND_CALLBACK_ABORTED        EQU    2
  268. REND_NO_VALID_PALETTE        EQU    3
  269.  
  270.  
  271. ;------------------------------------------------------------------------
  272. ;
  273. ;    SortPalette return codes
  274. ;
  275. ;    You must at least check for SORTP_SUCCESS.
  276. ;    SORTP_NO_DATA indicates that there were data missing,
  277. ;    e.g. you specified no histogram or the histogram was empty.
  278. ;
  279. ;------------------------------------------------------------------------
  280.  
  281. SORTP_SUCCESS            EQU    0
  282. SORTP_NO_DATA            EQU    1
  283. SORTP_NOT_ENOUGH_MEMORY        EQU    2
  284.  
  285.  
  286. ;------------------------------------------------------------------------
  287. ;
  288. ;    conversion return codes
  289. ;
  290. ;    These return codes apply to conversion functions
  291. ;    such as Chunky2RGB and ConvertChunky.
  292. ;
  293. ;------------------------------------------------------------------------
  294.  
  295. CONV_SUCCESS            EQU    0
  296. CONV_CALLBACK_ABORTED        EQU    1
  297. CONV_NOT_ENOUGH_MEMORY        EQU    2
  298.  
  299.  
  300. ;========================================================================
  301.  
  302.     ENDC
  303.